Skip to content

MigTD: handle target TD without SERVTD_EXT#759

Draft
haitaohuang wants to merge 1 commit intointel:mainfrom
haitaohuang:servtdext_disable2
Draft

MigTD: handle target TD without SERVTD_EXT#759
haitaohuang wants to merge 1 commit intointel:mainfrom
haitaohuang:servtdext_disable2

Conversation

@haitaohuang
Copy link
Contributor

On platforms with rebind support but no support or TD opts out for SERVTD_EXT, TDG.servtd.rd on the SERVTD_EXT fields in TDCS of a target TD would return zeros. This change reads TDCS.ATTRIBUTES to check bit 17 and makes SERVTD_EXT optional throughout the rebinding flow:

  • read_servtd_ext() reads TDCS.ATTRIBUTES via tdcall_servtd_rd and returns None when SERVTDEXT bit is not set
  • write_approved_servtd_ext_hash() accepts Option and is a no-op when None
  • Certificate generation/verification: servtd_ext extension is conditionally included and tolerated when missing
  • Policy verification (authenticate_rebinding_old) skips init report verification entirely when servtd_ext is unavailable, since the init TD report cannot be verified without servtd_info_hash
  • SPDM VDM messages send zero-length servtd_ext element when not available; receiver handles it gracefully
  • All TDCS write operations (write_servtd_rebind_attr, write_approved_servtd_ext_hash) are skipped when servtd_ext is None

On platforms with rebind support but no support or TD opts out for
SERVTD_EXT, TDG.servtd.rd on the SERVTD_EXT fields in TDCS of a target
TD would return zeros. This change reads TDCS.ATTRIBUTES to check bit 17
and makes SERVTD_EXT optional throughout the rebinding flow:

- read_servtd_ext() reads TDCS.ATTRIBUTES via tdcall_servtd_rd and
  returns None when SERVTDEXT bit is not set
- write_approved_servtd_ext_hash() accepts Option and is a no-op
  when None
- Certificate generation/verification: servtd_ext extension is
  conditionally included and tolerated when missing
- Policy verification (authenticate_rebinding_old) skips init report
  verification entirely when servtd_ext is unavailable, since the
  init TD report cannot be verified without servtd_info_hash
- SPDM VDM messages send zero-length servtd_ext element when not
  available; receiver handles it gracefully
- All TDCS write operations (write_servtd_rebind_attr,
  write_approved_servtd_ext_hash) are skipped when servtd_ext is None

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
@haitaohuang haitaohuang requested a review from jyao1 as a code owner March 20, 2026 18:19
@haitaohuang
Copy link
Contributor Author

make it draft as plans may change

@haitaohuang haitaohuang marked this pull request as draft March 26, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant